package com.ruoyi.biz.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.biz.mapper.CacheFolderMapper;
import com.ruoyi.biz.domain.CacheFolder;
import com.ruoyi.biz.service.ICacheFolderService;
import com.ruoyi.common.core.text.Convert;

/**
 * 缓存目录Service业务层处理
 * 
 * @author jiangnan
 * @date 2021-03-15
 */
@Service
public class CacheFolderServiceImpl implements ICacheFolderService 
{
    @Autowired
    private CacheFolderMapper cacheFolderMapper;

    /**
     * 查询缓存目录
     * 
     * @param id 缓存目录ID
     * @return 缓存目录
     */
    @Override
    public CacheFolder selectCacheFolderById(Long id)
    {
        return cacheFolderMapper.selectCacheFolderById(id);
    }

    /**
     * 查询缓存目录列表
     * 
     * @param cacheFolder 缓存目录
     * @return 缓存目录
     */
    @Override
    public List<CacheFolder> selectCacheFolderList(CacheFolder cacheFolder)
    {
        return cacheFolderMapper.selectCacheFolderList(cacheFolder);
    }

    /**
     * 新增缓存目录
     * 
     * @param cacheFolder 缓存目录
     * @return 结果
     */
    @Override
    public int insertCacheFolder(CacheFolder cacheFolder)
    {
        return cacheFolderMapper.insertCacheFolder(cacheFolder);
    }

    /**
     * 修改缓存目录
     * 
     * @param cacheFolder 缓存目录
     * @return 结果
     */
    @Override
    public int updateCacheFolder(CacheFolder cacheFolder)
    {
        return cacheFolderMapper.updateCacheFolder(cacheFolder);
    }

    /**
     * 删除缓存目录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCacheFolderByIds(String ids)
    {
        return cacheFolderMapper.deleteCacheFolderByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除缓存目录信息
     * 
     * @param id 缓存目录ID
     * @return 结果
     */
    @Override
    public int deleteCacheFolderById(Long id)
    {
        return cacheFolderMapper.deleteCacheFolderById(id);
    }
}
